<#include "/common/ftl/common.ftl">
<@html>
<article class="tbcWrap">
    <div class="tbcTbar">
        <a href="${ctx}/login.do" class="btn btn-info">返回</a>
    </div>
    <form id="userSearchForm">
    <section class="tbcAutoPanel">
        <div class="tbcMainPanel">
            <div class="tbcFilterBar">
                用户名：
                <input type="text" name="user.userName" placeholder="用户名" class="span2">
                <button class="btn btn-primary" type="button" onclick="showUsers()">筛选</button>
            </div>
            <div class="tbcFormCell">
                <button class="btn" type="button">添加用户</button>
            </div>
            <div class="tbcFormCell tbcTableCell">
                <@pagination id="userListContainer"/>
            </div>
        </div>
        </div>
    </section>
    </form>
</article>
</@html>
<script type="text/javascript">
    $(function () {
        showUsers();
    });

    function showUsers() {
        $('#userListContainer').data('param', {
            url:'${ctx!}/user/user.listAllUsers.do',
            param:$('#userSearchForm').serializeArray(),
            pageSize:${page.pageSize},
            pageNo:${page.pageNo}
        });
        $('#userListContainer').trigger('init');
    }
</script>
